@mixin modelingsdk-mapping-dialog($theme) {
    $foreground: map-get($theme, foreground);
    $background: map-get($theme, background);
    $error: map-get($theme, warn);

    modelingsdk-mapping-dialog {
        .mat-card {
            box-shadow: none !important;
        }
    }

    .mat-dialog-title {
        margin: 0 0 20px;
        display: block;
    }

    .mapping-icon {
        vertical-align: middle;
        margin-right: 5px;
    }

    div.mapping-dialog-content-container {
        display: flex;
        flex-direction: column;

        .mapping-dialog-selector-container {
            display: flex;
            justify-content: space-between;
            flex-direction: row;

            .mapping-dialog-selector-title {
                line-height: 33px;
                font-size: 18px;
            }

            .mapping-dialog-selector {
                width: 30%;
            }
        }

        .mapping-body {
            display: flex;
            justify-content: space-between;
            flex-direction: row;

            .mapping-table-viewer {
                min-height: 90px;
                margin-top: 10px;
                width: 50%;
                padding-right: 12px;
                height: 295px;

                .mat-table {
                    border: 1px solid mat-color($foreground, text, 0.07);
                    height: 100%;
                    overflow: scroll;

                    .mat-column-name {
                        width: 50%;
                    }

                    .mat-column-value {
                        width: 50%;
                    }

                    .mat-column-icon {
                        max-width: 24px;
                        padding: 0 12px;
                    }

                    .mat-column-delete {
                        max-width: 24px;
                        padding: 0 12px;
                    }

                    .input-disabled {
                        cursor: default;
                    }

                    span {
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }
                }

                .mat-header-row {
                    top: 0;
                    position: sticky;
                    background-color: mat-color($background, card);
                }

                .mat-row {
                    cursor: pointer;

                    &.active {
                        background-color: mat-color($foreground, text, 0.07);

                        .mat-cell {
                            color: mat-color($foreground, text);
                        }
                    }

                    &:last-of-type {
                        border-bottom: 0;
                    }

                    .ellipsis-cell {
                        display: flex;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                        line-height: 48px;
                    }

                    .required-indicator {
                        color: red;
                    }

                    .non-variable-mapping {
                        font-style: italic;
                    }
                }

                .add-btn {
                    float: right;
                    padding: 0 10px;
                    min-width: 30px;
                    margin-top: 10px;
                }

                .mat-column-delete {
                    text-align: right;
                }
            }

            .mapping-table-viewer.input-mapping-table {
                height: 340px;
            }

            .mapping-value-form {
                width: 50%;
                padding-left: 12px;
                display: flex;
                flex-direction: column;

                .variable-selector {
                    display: flex;
                    flex-direction: row;
                    padding: 12px 0;

                    mat-label {
                        width: 40%;
                    }

                    mat-select {
                        width: 60%;
                    }
                }

                div.mapping-value {
                    height: 100%;

                    mat-tab-group {
                        height: 100%;

                        .mat-tab-label,
                        .mat-tab-label-active {
                            min-width: 33%;
                        }

                        div.mat-tab-body-wrapper {
                            height: 100%;

                            mat-tab-body {
                                height: 100%;
                                padding: 24px;
                            }

                            mat-form-field {
                                width: 100%;
                            }
                        }
                    }

                    modelingsdk-input-mapping-table {
                        .mat-row,
                        .mat-header-row {
                            padding: 0 8px;
                        }
                    }
                }
            }
        }
    }

    .help-icon {
        line-height: 10px;
        font-size: 16px;
        width: 16px;
        height: 16px;
        position: relative;
        top: 4px;
        padding: 0 4px;
        opacity: 0.8;
        cursor: pointer;
    }
}
